def getGoodsTypeId(goodsTitle):
    """
    商品所属分类ID
    return typeID,name
    """

    if "糖果" in goodsTitle and "礼" in goodsTitle: return 48, "糖果礼盒"
    if "零食" in goodsTitle and "礼" in goodsTitle: return 49, "零食大礼包"

    if "卤味" in goodsTitle: return 6, "卤味"
    if "特产" in goodsTitle and "肉" in goodsTitle: return 46, "肉制品"
    if ("特产" in goodsTitle and "饼干" in goodsTitle) or ("特产" in goodsTitle and "糕" in goodsTitle): return 45, "糕点饼干"
    if "经典" in goodsTitle: return 44, "经典小吃"
    if "农" in goodsTitle: return 43, "农副产品"
    if "特产" in goodsTitle: return 4, "特产-其他"

    if "蜜饯" in goodsTitle: return 20, "蜜饯果干"
    if "肉干" in goodsTitle or "果干" in goodsTitle or "果脯" in goodsTitle: return 21, "肉干肉铺"
    if "坚果" in goodsTitle or "炒货" in goodsTitle: return 19, "坚果炒货"

    if "辣条" in goodsTitle: return 17, "辣味零食"
    if "蛋糕" in goodsTitle or "糕点" in goodsTitle: return 15, "糕点"
    if "膨化" in goodsTitle or "薯片" in goodsTitle or "锅巴" in goodsTitle or "油炸" in goodsTitle or "威化" in goodsTitle: return 14, "膨化食品"
    if "零食" in goodsTitle or "小吃" in goodsTitle: return 18, "休闲零食——其他"
    if "巧克力" in goodsTitle: return 16, "巧克力"

    if "原料" in goodsTitle or "材料" in goodsTitle or "必备" in goodsTitle: return 42, "米面粮油-其他"
    if ("冲" in goodsTitle and "饮" in goodsTitle) or ("粉" in goodsTitle and "饮" in goodsTitle): return 23, "冲饮"
    if "奶茶" in goodsTitle: return 25, "奶茶"
    if "茶" in goodsTitle or "树" in goodsTitle: return 24, "茶"
    if "咖啡" in goodsTitle: return 8, "咖啡"
    if "饮料" in goodsTitle: return 27, "饮料"

    if "面粉" in goodsTitle: return 39, "粮油类"
    if "成品" in goodsTitle or "挂面" in goodsTitle: return 40, "成品/半成品"
    if "粉" in goodsTitle: return 41, "谷物类"

    if "冷冻" in goodsTitle: return 35, "冷冻食品"
    if "自热" in goodsTitle: return 34, "自热食品"
    if "速食" in goodsTitle or "方便" in goodsTitle or "菜" in goodsTitle: return 36, "速食"

    if "喜糖" in goodsTitle or "婚庆" in goodsTitle: return 28, "喜糖"
    if "奶糖" in goodsTitle: return 30, "奶糖"
    if "糖" in goodsTitle: return 32, "糖果——其他"
    if "礼" in goodsTitle: return 2, "节日礼盒-其他"

    if "枣" in goodsTitle or "瓜子" in goodsTitle or "枸杞" in goodsTitle or "鸭" in goodsTitle or "松子" in goodsTitle or \
            "核桃" in goodsTitle or "肉" in goodsTitle or "鸡" in goodsTitle or "鱼" in goodsTitle: return 43, "农副产品"
    if "米" in goodsTitle or "面" in goodsTitle or "叶" in goodsTitle: return 41, "谷物类"
    if "料" in goodsTitle or "材" in goodsTitle: return 39, "粮油类"
    if "肠" in goodsTitle or "蛋" in goodsTitle: return 40, "成品/半成品"
    if "果" in goodsTitle or "干" in goodsTitle:
        return 22, "坚果蜜饯-其他"
    else:
        return None, None


def getCartInfo(goodsInfo):
    """
    评论购物详情
    """
    return '{"id":"4264052052651409408","type":0,"seckill_id":0,"bargain_id":0,"combination_id":0,"advance_id":0,"product_id":186,"product_attr_unique":"8febf001","cart_num":1,' \
           '"productInfo":{"id":1880,"mer_id":0,"image":"https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01oEU4Ib1ptUdg7aZAp_!!2213295655418-0-cib.jpg","recommend_image":"",' \
           '"slider_image":["https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01oEU4Ib1ptUdg7aZAp_!!2213295655418-0-cib.jpg","https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01O5AuhR1ptUdbUhuGi_!!2213295655418-0-cib.jpg","https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01nQ25sT1ptUdWdd3Xs_!!2213295655418-0-cib.jpg","https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN017aablY1ptUdgswtVl_!!2213295655418-0-cib.jpg","https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01Tg9Zc11ptUdgsxEIj_!!2213295655418-0-cib.jpg"],' \
           '"store_name":"\u897f\u5f0f\u7cd5\u70b9\u542f\u82ac\u5de7\u514b\u529b\u7194\u5ca9\u86cb\u7cd55\u679a\u4e0b\u5348\u8336\u5c0f\u70b9\u5fc3\u529e\u516c\u5ba4\u4f11\u95f2\u96f6\u98df","store_info":"\u897f\u5f0f\u7cd5\u70b9\u542f\u82ac\u5de7\u514b\u529b\u7194\u5ca9\u86cb\u7cd55\u679a\u4e0b\u5348\u8336\u5c0f\u70b9\u5fc3\u529e\u516c\u5ba4\u4f11\u95f2\u96f6\u98df","keyword":"\u5c0f\u70b9\u5fc3,\u4e0b\u5348\u8336,\u897f\u5f0f",' \
           '"bar_code":"","cate_id":"15","price":"9.00","vip_price":"0.00","ot_price":"11.00","postage":"0.00","unit_name":"\u4ef6","sort":0,"sales":215,"stock":4995,"is_show":1,"is_hot":0,"is_benefit":0,"is_best":0,"is_new":0,"is_virtual":0,"virtual_type":0,"add_time":1654238642,"is_postage":0,"is_del":0,"mer_use":0,"give_integral":"0.00","cost":"9.00","is_seckill":0,"is_bargain":0,"is_good":0,"is_sub":0,"is_vip":0,"ficti":0,"browse":0,"code_path":"","soure_link":"",' \
           '"video_link":"","temp_id":1,"spec_type":1,"activity":"0,1,2,3","spu":"5056101522961","label_id":"","command_word":"","recommend_list":"","vip_product":0,"presale":0,"presale_start_time":0,"presale_end_time":0,"presale_day":1,"logistics":"1","freight":4,"custom_form":"[]","attrInfo":{"id":7226,"product_id":1880,' \
           '"suk":"' + goodsInfo + '","stock":999,"sales":0,"price":"9.00","image":"https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01oEU4Ib1ptUdg7aZAp_!!2213295655418-0-cib.jpg","unique":"8febf001","cost":"9.00","bar_code":"","ot_price":"11.00","vip_price":"0.00","weight":"0.00","volume":"0.00","brokerage":"0.00",' \
                                   '"brokerage_two":"0.00","type":0,"quota":0,"quota_show":0,"is_virtual":0,"coupon_id":0,"disk_info":""},"express_delivery":true,"store_mention":false},"attrInfo":{"id":7226,"product_id":1880,' \
                                   '"suk":"\u7194\u5ca9\u86cb\u7cd5-5\u679a\u8bd5\u5403\u88c5","stock":999,"sales":0,"price":"9.00","image":"https:\/\/cbu01.alicdn.com\/img\/ibank\/O1CN01oEU4Ib1ptUdg7aZAp_!!2213295655418-0-cib.jpg","unique":"8febf001","cost":"9.00","bar_code":"","ot_price":"11.00","vip_price":"0.00","weight":"0.00","volume":"0.00","brokerage":"0.00","brokerage_two":"0.00","type":0,"quota":0,"quota_show":0,"is_virtual":0,"coupon_id":0,"disk_info":""},"sum_price":"9.00","truePrice":9,' \
                                   '"trueStock":999,"costPrice":"9.00","attrStatus":true,"vip_truePrice":0,"price_type":"level","is_valid":1,"postage_price":"15.00","use_integral":0,"integral_price":0,"coupon_price":0,"one_brokerage":"0.90","two_brokerage":"0.45","staff_brokerage":"0.00","agent_brokerage":"0.00","division_brokerage":"0.00","sum_true_price":"9.00"}'
